package com.glsc.ngateway.common.api.oaflow.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;

/**
 * @Author: libj
 * @Date: 2022/04/28
 * @Desc: 同步OA流程表单交易单元信息Dto
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class SynOaTradeSeatDto {

    @ApiModelProperty(value = "流程类型标识workflowId")
    protected String workflowId;

    @ApiModelProperty(value = "流程实例requestId")
    protected String requestId;

    @ApiModelProperty(value = "流程实例标题名称")
    protected String workflowName;

    @ApiModelProperty(value = "当前节点ID")
    protected Integer flowNodeCode;

    @ApiModelProperty(value = "流程状态类型")
    protected String flowStatusType;

    @ApiModelProperty(value = "当前节点，中文名，如强制归档、资管产品委委员发表意见等")
    protected String flowNode;

    @ApiModelProperty(value = "申请人ID")
    private String applicantAccount;

    @ApiModelProperty(value = "申请部门ID")
    private Integer applyDeptId;

    @ApiModelProperty(value = "申请部门")
    private String applyDeptName;

    @ApiModelProperty(value = "申请类型")
    private String applyType;

    @ApiModelProperty(value = "申请类型编码")
    private Integer applyTypeCode;

    @ApiModelProperty(value = "变更类型")
    private String changeType;

    @ApiModelProperty(value = "变更类型编码")
    private Integer changeTypeCode;

    @ApiModelProperty(value = "申请时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String applyDate;

    @ApiModelProperty(value = "申请说明")
    private String applyDesc;

    @ApiModelProperty(value = "交易单元信息列表")
    protected List<SynOaTradeSeatInfoDto> tradeSeatInfoList;
}
/*

{
    "code":0,
    "data":[
        {
            "flowNodeCode":1109522,
            "flowNode":"结束",
            "requestId":465805,
            "flowInfos":{
                "ID":2,
                "applyNumber":"jydyxgywlc20220400002",
                "applyDate":"2022-04-25",
                "applicant":"丁玥,dingyue@glsc.com.cn",
                "applicantDepart":"资产管理部/综合组",
                "applicantComp":"国联证券总部",
                "expenseDepartment":"803",
                "applyType":"变更",
                "applyTypeCode":2,
                "changeType":"1.流速权变更",
                "changeTypeCode":0,
                "detailMap3":[
                    {
                        "changeDetail":"测试343434",
                        "dealDate":"2022-04-26",
                        "tradeSeatCode":"8",
                        "tradeSeatMarket":0,
                        "businessType":0
                    },
                    {
                        "changeDetail":"3232323",
                        "dealDate":"2022-04-28",
                        "tradeSeatCode":"8",
                        "tradeSeatMarket":0,
                        "businessType":2
                    },
                    {
                        "changeDetail":"3232333",
                        "dealDate":"2022-04-18",
                        "tradeSeatCode":"8",
                        "tradeSeatMarket":1,
                        "businessType":2
                    },
                    {
                        "changeDetail":"3232323",
                        "dealDate":"2022-04-15",
                        "tradeSeatCode":"8",
                        "tradeSeatMarket":0,
                        "businessType":4
                    }
                ],
                "applicantAccount":"dingyue"
            },
            "workflowName":"41.交易单元相关业务流程-产品系统采集测试0425",
            "flowStatusType":"3"
        }
    ],
    "status":"SUCCESS"
}

* */